import { Result, Button } from 'antd'
import { useNavigate } from 'react-router-dom'

const Page404 = () => {
  const navigate = useNavigate()
    return (
      <Result
        status="404"
        title="您访问的页面不存在"
        subTitle="去逛逛其他页面吧"
        extra={
          <Button 
            type="primary"
            onClick={() => {
              navigate('/', { replace: true })
              }}>
                回到首页
            </Button>
        }
      />
    )
}
export default Page404